#pragma once
#ifndef MODELSLICESPRODUCER_H
#define MODELSLICESPRODUCER_H

#include <QVector3D>
#include <QVector>
#include <QPair>
#include <QDebug>

#include "ModelFormation.h"

class ModelSlicesProducer
{
public:
    ModelSlicesProducer() = default;

    QVector<QPair<QPair<float, float>, Edge>> preprocessModelDataAlongDirection(const QVector<Edge>& model_edges, const QVector3D& direction_norm);

    void generateSlicesLambda(const QVector<QPair<QPair<float, float>, Edge> > &preprocess_edges, float in_fix_stride, QVector<float> &out_strides);
    void generateShownVertices(const QVector<QPair<QPair<float, float>, Edge> > &preprocessed_partitions, const QVector3D& slice_norm, float stride,
                               QVector<Vertex>& out_intersected_points, QVector<qsizetype>& out_intersected_points_counts, QVector<float>& out_slice_lambdas);

private:
    float m_highest = -FLT_MAX, m_lowest = FLT_MAX;
};

#endif // MODELSLICESPRODUCER_H
